Chip transient temperature predictor

ABSTRACT

An integrated circuit (IC) includes: a plurality of hardware performance counters; a thermal sensor; and a micro-controller. The micro-controller generates a plurality of thermal predictors based on values of the counters and temperatures sensed by the thermal sensor. The thermal predictors include first and second rising thermal delta predictors to predict rising temperature deltas and first and second falling thermal delta predictors to predict falling temperature deltas. The micro-controller predicts a future temperature of the IC based on an idle temperature of the IC and a selected one of the temperature deltas.

CROSS-REFERENCE TO RELATED APPLICATION

This application is a continuation of U.S. patent application Ser. No.15/066,761, filed on Mar. 10, 2016, which is fully incorporated hereinby reference

STATEMENT REGARDING FEDERALLY SPONSORED RESEARCH OR DEVELOPMENT

This invention was made with Government support under Contract No.:HR0011-13-C-0022 awarded by Defense Advanced Research Projects Agency(DARPA). The Government has certain rights in this invention.

BACKGROUND

An integrated circuit (IC) is a set of electronic circuits on one smallplate (“chip”) of semiconductor material. ICs can be made much smallerthan a discrete circuit, which is made from independent electroniccomponents. ICs can be made very compact, having up to several billiontransistors and other electronic components in a very small area. As anexample, a single chip can house an entire Central Processing Unit(CPU).

The temperature of a chip housing a CPU may rise when instructions areexecuted by the CPU. However, if the temperature of the chip rises tohigh, it may cause components of the chip to temporarily malfunction orpermanently fail.

Thus, there is a need for a chip that can better protect itself againsttemporary malfunction and permanent failures due to an excessiveoperating temperature.

SUMMARY

According to an exemplary embodiment of the invention, an integratedcircuit (IC) includes: a plurality of hardware performance counters; athermal sensor; and a micro-controller. The micro-controller generates aplurality of thermal predictors based on values of the counters andtemperatures sensed by the thermal sensor. The thermal predictorsinclude first and second rising thermal delta predictors to predictrising temperature deltas and first and second falling thermal deltapredictors to predict falling temperature deltas. The micro-controllerpredicts a future temperature of the IC based on an idle temperature ofthe IC and a selected one of the temperature deltas.

According to an exemplary embodiment of the invention, a method ofpredicting a future temperature within an integrated circuit (IC)includes: generating, first and second rising thermal delta predictors,based on values of hardware counters of the IC and temperatures sensedby a thermal sensor within the IC, to predict rising temperature deltas;generating, first and second falling thermal delta predictors, based onvalues of hardware counters of the IC and temperatures sensed by thethermal sensor within the IC, to predict falling temperature deltas; andgenerating the future temperature based on an idle temperature of the ICand a selected one of the temperature deltas.

BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWINGS

The accompanying drawings, which are incorporated herein and form partof the specification, illustrate the present invention and together withthe description, further serve to explain the principles of theinvention and to enable a person skilled in the pertinent art to makeand use the invention.

FIG. 1 is a schematic block diagram block diagram illustrating acomputer system, which may house an exemplary embodiment of theinvention.

FIG. 2 illustrates a processing unit (e.g., a CPU) of the computersystem according to an exemplary embodiment of the invention.

FIG. 3 illustrates a sample plot for describing derivation of thermaldelta predictors used in embodiments of the invention.

FIG. 4 illustrates a system diagram including a micro-controller of theprocessing unit according to an exemplary embodiment of the invention.

FIG. 5 illustrates an operation of the micro-controller according to anexemplary embodiment of the invention.

FIG. 6 illustrates a configuration of a thermal delta predictoraccording to an exemplary embodiment of the invention.

FIG. 7 illustrates a method of selecting one of the thermal deltapredictors according to an exemplary embodiment of the invention.

FIG. 8 illustrates a method of selecting one of the thermal deltapredictors according to an exemplary embodiment of the invention.

FIG. 9 illustrates a method of selecting one of the thermal deltapredictors according to an exemplary embodiment of the invention.

FIG. 10 illustrates a method of selecting one of the thermal deltapredictors according to an exemplary embodiment of the invention.

DETAILED DESCRIPTION

The inventive concept will be described in more detail with reference tothe accompanying drawings, where exemplary embodiments of the presentdisclosure have been illustrated. Throughout the drawings, same or likereference numerals are used to represent the same or like components.However, the present inventive concept can be implemented in variousmanners, and thus should not be construed to be limited to theembodiments disclosed herein. On the contrary, those embodiments areprovided for the thorough and complete understanding of the presentdisclosure to convey the scope of the present disclosure to thoseskilled in the art.

FIG. 1 illustrates an exemplary computer system/server 12, which mayhouse a processing unit according to embodiments of the presentinvention. The computer system/server 12 is only illustrative and is notintended to suggest any limitation as to the scope of use orfunctionality of embodiments of the invention described herein.

As shown in FIG. 1, the computer system/server 12 is shown in the formof a general-purpose computing device. The components of the computersystem/server 12 may include, but are not limited to, one or moreprocessors or processing units 16, a system memory 28, and a bus 18 thatcouples various system components including system memory 28 toprocessor 16.

Bus 18 represents one or more of any of several types of bus structures,including a memory bus or memory controller, a peripheral bus, anaccelerated graphics port, and a processor or local bus using any of avariety of bus architectures. By way of example, and not limitation,such architectures include an Industry Standard Architecture (ISA) bus,a Micro Channel Architecture (MCA) bus, an Enhanced ISA (EISA) bus, aVideo Electronics Standards Association (VESA) local bus, and aPeripheral Component Interconnect (PCI) bus.

The computer system/server 12 may include a variety of computer systemreadable media. Such media may be any available media that is accessibleby the computer system/server 12, and it includes both volatile andnon-volatile media, removable and non-removable media.

The system memory 28 can include computer system readable media in theform of volatile memory, such as random access memory (RAM) 30 and/orcache memory 32. The computer system/server 12 may further include otherremovable/non-removable, volatile/non-volatile computer system storagemedia. By way of example, storage system 34 can be provided for readingfrom and writing to a non-removable, non-volatile magnetic media (notshown and typically called a “hard drive”). Although not shown, amagnetic disk drive for reading from and writing to a removable,non-volatile magnetic disk (e.g., a “floppy disk”), and an optical diskdrive for reading from or writing to a removable, non-volatile opticaldisk such as a CD-ROM, DVD-ROM or other optical media can be provided.In such instances, each can be connected to bus 18 by one or more datamedia interfaces. As will be further depicted and described below,memory 28 may include at least one program product having a set (e.g.,at least one) of program modules.

A program/utility 40, having a set (at least one) of program modules 42,may be stored in memory 28 by way of example, and not limitation, aswell as an operating system, one or more application programs, otherprogram modules, and program data. Each of the operating system, one ormore application programs, other program modules, and program data orsome combination thereof, may include an implementation of a networkingenvironment. The program modules 42 generally carry out the functionsand/or methodologies of embodiments of the invention as describedherein.

The computer system/server 12 may also communicate with one or moreexternal devices 14 such as a keyboard, a pointing device, a display 24,etc.; one or more devices that enable a user to interact with thecomputer system/server 12; and/or any devices (e.g., network card,modem, etc.) that enable the computer system/server 12 to communicatewith one or more other computing devices. Such communication can occurvia Input/Output (I/O) interfaces 22. The computer system/server 12 cancommunicate with one or more networks such as a local area network(LAN), a general wide area network (WAN), and/or a public network (e.g.,the Internet) via a network adapter 20. As depicted, the network adapter20 communicates with the other components of computer system/server 12via the bus 18. It should be understood that although not shown, otherhardware and/or software components could be used in conjunction withthe computer system/server 12. Examples of these other hardware and/orsoftware components include, but are not limited to: microcode, devicedrivers, redundant processing units, external disk drive arrays, RAIDsystems, tape drives, and data archival storage systems.

FIG. 2 illustrates the processing unit 16 of FIG. 1 according to anexemplary embodiment of the inventive concept. While FIG. 1 illustratesthat the processing unit 16 is part of a computer server 12, theinvention is not limited thereto. For example, the processing unit 16may part of a system on chip. The processing unit 16 is an integratedcircuit (e.g., a chip). The processing unit 16 includes one or morehardware performance counters 210, one or more thermal sensors 240, anda micro-controller 250. The processing unit 16 may include one or moreprocessing cores 220, one or more registers 230, an actuator 260, and atask library 270. The processing unit 16 may additionally include one ormore volatile or nonvolatile memories, which may be formatted as one ormore caches.

The thermal sensors 240 may be located in close proximity to respectivecores 220-1, 220-2, . . . , 220-N. For example, a first one of thethermal sensors 240 may be located near or in contact with the firstcore 220-1 to detect a current temperature of the first core 220-1, asecond one of the thermal sensors 240 may be located near or in contactwith the second core 220-2 to detect a current temperature of the secondcore 220-2, etc. In an embodiment, the thermal sensors 240 are one of anon-chip ring oscillator or oscillator-based temperature sensor, anon-chip biased current generator, a thermocouple, a resistancethermometer, and a silicon bandgap temperature sensor. While a pluralityof thermal sensors 240 are illustrated in FIG. 2, in an alternateembodiment, only a single thermal sensor is present. In an embodiment,the thermal sensors 240 are located outside the processing unit 16.

The hardware performance counters 210 include a plurality of hardwarecounters 210-1, 210-2, . . . , 210-N. In an embodiment, the hardwarecounters (also referred to as activity counters) are a set ofspecial-purpose registers built into the processing unit 16, themicro-controller 250, or one or more of the cores 220 to store thecounts of hardware-related activities. Compared to software profilers,hardware counters provide low-overhead access to a wealth of detailperformance information related to a CPU's or a processing core'sfunctional units, caches, and main memory. The hardware counters mayinclude distinct counters to count the number of floating-point unit(FPU) operations performed (e.g., a dispatched floating point unitoperations counter), an FPU utilization, the number of reads performed,the number of writes performed, the number of data cache accesses, thenumber of data cache misses, the number of data cache lines evicted, thenumber of memory requests (e.g., to non-cacheable memory, towrite-combining (WC) memory, etc.), the number of data pre-fetches,number of requests to cache, number of instruction cache fetches, numberof instruction cache misses, respectively. Please note that the precisenumber of hardware counters and their type varies based on the type ofprocessor used. Thus, the invention is not limited to the above listedhardware counters.

The micro-controller 250 (e.g., a microprocessor) operates on thetemperature data received from one or more of the thermal sensors 240 topredict a temperature of the processing unit 16 or one or more of theprocessing cores 220 or a single CPU in an embodiment where the multipleprocessing cores 220 are replaced with a single core or CPU. If thepredicted temperature exceeds a safe operating temperature, themicro-controller 250 can perform an action to reduce the currenttemperature or prevent the current temperature from reaching thepredicted temperature.

In an exemplary embodiment, prediction of a Predicted Temperature 450(e.g., a future temperature) requires the micro-controller 250 to firstgenerate Thermal Predictors 420 based on temperature data received fromone or more of the thermal sensors 240 and counts received from one ormore of the hardware performance counters 210. The processing unit 16may be operated in a test mode or operated on a test program while theThermal Predictors 420 are being generated.

FIG. 3 is an example of points plotted based on temperature and counterdata collected during the test mode. In this example, data from only asingle one of the hardware performance counters 210 is used. In thisexample, the single hardware performance counter provides a count of thecurrent utilization level of a FPU located within the processing unit16, within one of the cores 220, or located within a single CPU when thecores 220 are replaced by a single CPU. In this example, the temperatureand FPU utilizations are sampled periodically at a time window of every250 ms. However, the invention is not limited thereto. Further, the timewindow need not be 250 ms, and may be vary in alternate embodiments. Thesize of the time window may be stored in one of registers 230. Eachsampled temperature and FPU utilization pair is then plotted as a pointon the graph shown in FIG. 3. Linear regression is then performed on thepoints to determine a first line 301 of a first slope, a second line 302of a second slope, a third line 303 of a third slope, and a fourth line304 of a fourth slope.

The first and second lines 301 and 302 are indicative of a risingtemperature. The first line 301 may used to generate the first RisingThermal Delta Predictor 421. The second line 302 may be used to generatethe second Rising Thermal Delta Predictor 422. The slope of the firstline 301 is typically fairly steep as compared to the slope of thesecond line 302. The slopes of the first and second lines 301 and 302may be considered positive slopes because they indicate risingtemperatures. The magnitude of the slope of the first line 301 is higherthan the magnitude of the slope of the second line 302.

The third and fourth lines 303 and 304 are indicative of a fallingtemperature. The third line 303 may used to generate the first FallingThermal Delta Predictor 423. The fourth line 304 may be used to generatethe second Falling Thermal Delta Predictor 424. The slope of the thirdline 303 is fairly steep as compared to the slope of the fourth line304. The slopes of the third and fourth lines 303 and 304 may beconsidered negative slopes because they indicate falling temperatures.The magnitude of the slope of the third line 303 is higher than themagnitude of the slope of the fourth line 304.

FIG. 4 is a system diagram showing an interaction of themicro-controller 250 with elements of the processing unit 16 to generatethe Thermal Predictors 420 and a Predicted Temperature 450, according toan exemplary embodiment of the invention. The micro-controller 250 usesoutputs of one or more of the hardware counters 210 to generate anaggregate count and applies the aggregate count to each if the ThermalPredictors 420, to generate four temperature deltas, one associated witheach of the Thermal Predictors 420. The predictor selector 430 (e.g.,logic of the micro-controller 250) selects one of the four temperaturedeltas using data it receives from one or more temperature historyregisters 402 as the Predicted Thermal Delta 440. The PredictedTemperature 450 is a sum of the Predicted Thermal data 440 and an IdleTemperature, which may be stored in an Idle Temperature Register 401.The Idle Temperature may be the temperature of the processing unit 16when the processing unit 16 is idle or an ambient temperature. Forexample, the ambient temperature may be the temperature of thesurrounding environment, which may be sensed from a temperature sensor240 located outside the processing unit 16. For example, if the idletemperature is 60° C., and the Predicted Thermal Delta is 5° C., thenthe Predicted Temperature 450 is 65° C. The temperature historyregisters 402 and/or the idle temperature register 401 may be registerslocated in registers 230 of FIG. 2.

If the Predicted Temperature 450 is too high (e.g., exceeds apre-defined threshold temperature stored in a one of registers 230), theactuator 260 (e.g., logic of the micro-controller 250 or a separatemicro-controller or on-chip micro-controller) can throttle theprocessing unit 16 or one or more of the cores 220, perform taskmigration/swapping, task priority adjustments, or adjust the schedulesof tasks. For example, the actuator 260 could perform the throttling byreducing the operating frequency of the processing unit 16 or one ormore of the cores 220. In an embodiment, the actuator 260 is a mechanism(e.g., relay, switch, motor, etc.) that is used to control the speed ofa fan that is angled to direct air at the processing unit 16 or controla thermoelectric cooling device for the purpose of cooling theprocessing unit 16. For example, the actuator 260 can increase the speedof the fan from a current lower speed to a higher speed when thePredicted Temperature 450 exceeds the pre-defined threshold and returnthe speed to the previous lower speed when the Predicted Temperature 450is below or at the pre-defined threshold. In an embodiment, thethermoelectric cooling device is a Peltier device, a Peltier heat pump,a solid state refrigerator, or a thermoelectric cooler (TEC). Forexample, the actuator 260 can increase the operational current level ofthermoelectric cooling device from a lower current level to a highercurrent level when the Predicted Temperature 450 exceeds the pre-definedthreshold and return the operational current level to the previous lowercurrent level when the Predicted Temperature 450 is below or at thepre-defined threshold. In an embodiment, the actuator 260 is a mechanismto control the temperature of a liquid coolant in a liquid coolingsystem that can be used to cool the processing unit 16. For example, theactuator 260 can decrease the coolant temperature from a highertemperature to a lower temperature when the Predicted Temperature 450exceeds the pre-defined threshold and return the coolant temperature tothe previous lower temperature level when the Predicted Temperature 450is below or at the pre-defined threshold. The actuator 260 can useinformation stored in the library 270 to adjust how tasks are executedwhen the Predicted Temperature 450 is too high. For example, if theprocessing unit 16 has currently assigned a first amount of run time toa first task and assigned a second amount of run time to a second task,and the library 270 indicates that the first task is considered a hottask (e.g., a task that increases the temperature more than most tasks)and the second task is considered a cold task (e.g., a task that onlynominally increases the temperature), the actuator 260 can reduce thefirst amount of time and/or increase the second amount of time. If thelibrary 270 indicates the first core 220-1 is a hot core (e.g., a corethat typically has a significantly higher operating temperature thanother cores) and a second core 220-2 is cold core (e.g., a core thattypically has a lower operating temperature than other cores), theactuator 260 can migrate tasks from the first code 220-1 to the secondcore 220-2. In an embodiment, the Library 270 is stored in a memory ofthe processing unit 16.

FIG. 5 illustrates an operation being performed by the micro-controller250 to generate aggregate counts to be applied to one of the thermalpredictors illustrated in FIG. 6. In this example, two hardware counters210-1 and 210-2 are used. For convenience of explanation, it will beassumed that the first hardware counter 210-1 counts floating-pointoperations performed and the second hardware counter 210-1 countsrequests to a cache. The micro-controller 250 periodically samples thehardware counters 210. For example, if the period is 250 ms, then every250 ms, the micro-controller 250 stores a new value of each of thehardware counters. For example, at times 0, 250, 500, and 750, themicro-controller 250 might record that 5, 7, 3, and 2 floating-pointoperations have been performed, respectively, and record that 3, 6, 2,and 8 requests to the cache have been performed, respectively. A firstaggregator 501 (e.g., logic of the micro-controller 250 or a separateadder circuit) sums a certain number of the most recently recorded dataof the first hardware counter 210-1 based on a value stored in thehistory window size register 403 to generate a first sum (e.g., seeAggregated Count1 in FIG. 6), and a second aggregator 502 (e.g., logicof the micro-controller 250 or a separate adder circuit) sums the samenumber of the most recently recorded data of the second hardware counter210-2 based on the same value to generate a second sum (e.g., seeAggregated Count2 in FIG. 6). For example, if the value indicates awindow size of 500 ms, then the first sum would be a sum of 7, 3, and 2and the second sum would be a sum of 6, 2, and 8, since they weresampled within the last 500 ms.

FIG. 6 illustrates one of the Thermal Delta Predictors 420, according toan exemplary embodiment of the invention. The thermal delta predictormultiplies the first sum (e.g., Aggregated Count1) by a first weight θ₁to generate a first value, multiplies the second sum by a second weightθ₂ to generate a second value, and an aggregator (e.g., logic of themicro-controller 250 or a separate adder circuit) of the predictor sumsthe values to generate a thermal delta. The thermal predictor mayperform the above-described multiplications using a mixer or amultiplier. The values of the weights differ based on whether thethermal delta predictor is the first Rising Thermal Delta Predictor 421,the second Rising Thermal Delta Predictor 422, the first Falling ThermalDelta Predictor 423, or the second Falling Thermal Delta Predictor 424.While FIG. 6 shows use of only 2 aggregated counts, the invention is notlimited there to. For example, a thermal delta predictor may considercounts from additional hardware performance counters. When additionalhardware performance counters are used, the corresponding aggregatedcounts of the additional hardware performance counters are multiplied bycorresponding additional weights and summed with the other multipliedresults to generate the Thermal Delta.

FIG. 7 illustrates a method of the Predictor Selector 430 selecting oneof the thermal deltas generated by the Thermal Predictors 420 to arriveat the Predicted Thermal Delta 440, according to an exemplary embodimentof the invention. It is assumed that the aggregate counts of thehardware counters 210 have already been applied to each of the ThermalDelta Predictors (TDP) 420, and accordingly, each thermal deltapredictor has already generated its respective thermal delta.

The method then includes computing the minimum of the predicted valuesamong the thermal deltas generating by the Rising Thermal DeltaPredictors 421 and 422 (S701). For example, if the first Rising ThermalDelta Predictor 421 has generated a thermal delta of 5° C. and thesecond Rising Thermal Delta Predictor 422 has generated a thermal deltaof 9° C., the minimum value would be 5° C. Next, the method determineswhether the minimum value is greater than or equal to a most recentlyrecorded temperature difference (e.g., Delta Temperature) (S702). Forexample, if the previously recorded temperature T−1n is 60° C. and thecurrently recorded temperature T is 63° C., then the minimum value of 5°C. is greater than the temperature difference of 3° C. (e.g., the DeltaTemperature). Accordingly, the method would select the rising thermaldelta predictor that has the minimum predicted value (S703). In thisexample, the method would have selected the first Rising Thermal Deltapredictor 421, and accordingly, the Predicted Thermal Data 440 would be5° C. For example, if the idle temperature is 60° C., then the PredictedTemperature 450 would be 65° C.

The method also includes computing the maximum of the predicted valuesof the falling thermal delta predictors (S704). This step may not occurif step S702 already determined that the minimum value of the risingthermal delta predictors 421 and 422 is greater than or equal to theDelta Temperature. If the first Falling Thermal Delta Predictor 423predicted a thermal delta of 2° C. and the second Falling Thermal DeltaPredictor 424 predicted a thermal delta of 3° C., then the maximum valuewould be 3° C. If the minimum value predicted by the rising thermaldelta predictors is less than the Delta Temperature, then the methodselects the falling thermal delta predictor that has the maximumpredicted value (S705). For example, if the Delta Temperature hadinstead been 6° C., the second Falling Thermal Delta Predictor 424 wouldbe selected, and accordingly, the Predicted Thermal Delta 440 would be3° C. For example, if the idle temperature is 60° C., then the PredictedTemperature 450 would be 63° C.

FIG. 8 illustrates a method of the Predictor Selector 430 selecting oneof the thermal deltas to arrive at the Predicted Thermal Delta 440,according to an exemplary embodiment of the invention. Is it assumedthat the aggregate counts of the hardware counters 210 have already beenapplied to each of the Thermal Predictors (TDP) 420, and accordingly,each thermal delta predictor has already generated its respectivethermal delta. It is also assumed that each of the Thermal Predictors420 is associated with a particular temperature range. The first RisingThermal Delta Predictor 421 is associated with a first temperature rangeand the second Rising Thermal Delta Predictor 422 is associated with asecond temperature range that differs from the first temperature range.In an embodiment, the first temperature range does not overlap with thesecond temperature range. The first Falling Thermal Delta Predictor 423is associated with a third temperature range and the second FallingThermal Delta Predictor 424 is associated with a fourth temperaturerange that differs from the third temperature range. In an embodiment,the third temperature range does not overlap with the fourth temperaturerange. The method determines whether the current temperature T is lessthan the previous temperature T−1n (S801). One or more of the ThermalSensors 240 stores a history of the temperatures including the currenttemperature T and the previous temperature T−1n in the temperaturehistory registers 402, which may be located in registers 230.

If the Current Temperature T is greater than the Previous TemperatureT−1n, the method decides to use one of the Rising Thermal DeltaPredictors 421 and 422 (S802). Then, the method determines whether theCurrent Temperature T is within the first temperature range of the firstRising Thermal Delta Predictor 421 (S803). If the Current Temperature Tis within the first temperature range, the method selects the firstRising Thermal Delta Predictor 421 (S804). If the Current Temperature Tis not within the first temperature range, the method determines whetherthe current temperature T is within the second temperature range of thesecond Rising Thermal Delta Predictor 422 (S805). If the currenttemperature T is within the second temperature range, the method selectsthe second Rising Thermal Delta Predictor 422 (S806). For example, ifthe previous temperature T−1n is 64° C., the current temperature T is65° C., the first temperature range is 63-68° C., the second temperaturerange is 68-72° C., the first Rising Thermal Delta Predictor 421predicts an increase of 5° C., the second Rising Thermal Delta Predictor422 predicts an increase of 6° C., then the first Rising Thermal DeltaPredictor 421 would be selected, and accordingly, the Predicted ThermalDelta 440 would be 5° C. For example, if the idle temperature is 60° C.,then the Predicted Temperature 450 would be 65° C.

If the Current Temperature T is less than the Previous Temperature T−1n,the method decides to use one of the Falling Thermal Delta Predictors423 and 424 (S807). Then, the method determines whether the CurrentTemperature T is within the third temperature range of the second RisingThermal Delta Predictor 423 (S808). If the Current Temperature T iswithin the third temperature range, the method selects the first FallingThermal Delta Predictor 423 (S809). If the Current Temperature T is notwithin the third temperature range, the method determines whether theCurrent Temperature T is within the fourth temperature range of thesecond Falling Thermal Delta Predictor 424 (S810). If the CurrentTemperature T is within the fourth temperature range, the method selectsthe second Falling Thermal Delta Predictor 424 (S811). For example, ifthe Previous Temperature T−1n is 65° C., the current temperature T is64° C., the third temperature range is 68-72° C., the fourth temperaturerange is 63-68° C., the second Falling Thermal Delta Predictor 424predicts a thermal delta of 2° C., the first Falling Thermal DeltaPredictor 423 predicts a thermal delta of 3° C., then the second FallingThermal Delta Predictor 424 would be selected, and accordingly, thePredicted Thermal Delta 440 would be 2° C. For example, if the idletemperature is 60° C., then the Predicted Temperature 450 would be 62°C.

FIG. 9 illustrates a method of the Predictor Selector 430 selecting oneof the thermal deltas to arrive at the Predicted Thermal Delta 440,according to an exemplary embodiment of the invention. The methodincludes determining whether the Current Temperature T is greater thanthe previously Predicted Temperature (S901).

If the Current Temperature T is greater than the previously PredictedTemperature (e.g., a predicted future temperature), the method decidesto use one of the Rising Thermal Delta Predictors 421 and 422 (S902).Then, the method determines whether the Current Temperature T is withinthe first temperature range of the first Rising Thermal Delta Predictor421 (S903). If the Current Temperature T is within the first temperaturerange, the method selects the first Rising Thermal Delta Predictor 421(S904). If the Current Temperature T is not within the first temperaturerange, the method determines whether the Current Temperature T is withinthe second temperature range of the second Rising Thermal DeltaPredictor 422 (S905). If the Current temperature T is within the secondtemperature range, the method selects the second Rising Thermal DeltaPredictor 422 (S906). For example, if the previously PredictedTemperature is 64° C., the current temperature T is 65° C., the firsttemperature range is 63-68° C., the second temperature range is 68-72°C., the first Rising Thermal Delta Predictor 421 predicts an increase of5° C., the second Rising Thermal Delta Predictor 422 predicts anincrease of 6° C., then the first Rising Thermal Delta Predictor 421would be selected, and accordingly, the Predicted Thermal Delta 440would be 5° C. For example, if the idle temperature is 60° C., then thePredicted Temperature 450 would be 65° C.

If the Current Temperature T is less than the Previously PredictedTemperature T, the method decides to use one of the Falling ThermalDelta Predictors 423 and 424 (S907). Then, the method determines whetherthe Current Temperature T is within the third temperature range of thesecond Rising Thermal Delta Predictor 423 (S908). If the CurrentTemperature T is within the third temperature range, the method selectsthe first Falling Thermal Delta Predictor 423 (S909). If the CurrentTemperature T is not within the third temperature range, the methoddetermines whether the Current Temperature T is within the fourthtemperature range of the second Falling Thermal Delta Predictor 424(S910). If the Current Temperature T is within the fourth temperaturerange, the method selects the second Falling Thermal Delta Predictor 424(S911). For example, if the Previously Predicted Temperature T is 65°C., the Current Temperature T is 64° C., the third temperature range is68-72° C., the fourth temperature range is 63-68° C., the second FallingThermal Delta Predictor 424 predicts a thermal delta of 2° C., the firstFalling Thermal Delta Predictor 423 predicts a thermal delta of 3° C.,then the second Falling Thermal Delta Predictor 424 would be selected,and accordingly, the Predicted Thermal Delta 440 would be 2° C. Forexample, if the idle temperature is 60° C., then the PredictedTemperature 450 would be 62° C. The Predicted Temperature 450illustrated in FIG. 4 and generated from a prior iteration may be storedin one of the Temperature History Registers 402 as the PreviouslyPredicted Temperature T for use in the method of FIG. 9.

FIG. 10 illustrates a method of the Predictor Selector 430 selecting oneof the thermal deltas to arrive at the Predicted Thermal Delta 440,according to an exemplary embodiment of the invention. The methodincludes determining whether the most recent Previously PredictedTemperature T is greater than the next most recent Previously PredictedTemperature T−1 (S1001).

If the most recent Previously Predicted Temperature T is greater thanthe next most recent Previously Predicted Temperature T−1, the methoddecides to use one of the Rising Thermal Delta Predictors 421 and 422(S1002). Then, the method determines whether the most recent PreviouslyPredicted Temperature T is within the first temperature range of thefirst Rising Thermal Delta Predictor 421 (S1003). If the most recentPreviously Predicted Temperature T is within the first temperaturerange, the method selects the first Rising Thermal Delta Predictor 421(S1004). If the most recent Previously Predicted Temperature T is notwithin the first temperature range, the method determines whether themost recent Previously Predicted Temperature T is within the secondtemperature range of the second Rising Thermal Delta Predictor 422(S1005). If the most recent Previously Predicted Temperature T is withinthe second temperature range, the method selects the second RisingThermal Delta Predictor 422 (S1006). For example, if the next mostrecent Previously Predicted Temperature is 64° C., the most recentPreviously Predicted Temperature T is 65° C., the first temperaturerange is 63-68° C., the second temperature range is 68-72° C., the firstRising Thermal Delta Predictor 421 predicts an increase of 5° C., thesecond Rising Thermal Delta Predictor 422 predicts an increase of 6° C.,then the first Rising Thermal Delta Predictor 421 would be selected, andaccordingly, the Predicted Thermal Delta 440 would be 5° C. For example,if the idle temperature is 60° C., then the Predicted Temperature 450would be 65° C.

If the most recent Previously Predicted Temperature T is less than thenext most recent Previously Predicted Temperature T−1, the methoddecides to use one of the Falling Thermal Delta Predictors 423 and 424(S1007). Then, the method determines whether the most recent PreviouslyPredicted Temperature T is within the third temperature range of thesecond Rising Thermal Delta Predictor 423 (S1008). If the most recentPreviously Predicted Temperature T is within the third temperaturerange, the method selects the first Falling Thermal Delta Predictor 423(S1009). If the most recent Previously Predicted Temperature T is notwithin the third temperature range, the method determines whether themost recent Previously Predicted Temperature T is within the fourthtemperature range of the second Falling Thermal Delta Predictor 424(S1010). If the most recent Previously Predicted Temperature T is withinthe fourth temperature range, the method selects the second FallingThermal Delta Predictor 424 (S1011). For example, if the next mostrecent Previously Predicted Temperature T is 65° C., the most recentPreviously Predicted Temperature T is 64° C., the third temperaturerange is 68-72° C., the fourth temperature range is 63-68° C., thesecond Falling Thermal Delta Predictor 424 predicts a thermal delta of2° C., the first Falling Thermal Delta Predictor 423 predicts a thermaldelta of 3° C., then the second Falling Thermal Delta Predictor 424would be selected, and accordingly, the Predicted Thermal Delta 440would be 2° C. For example, if the idle temperature is 60° C., then thePredicted Temperature 450 would be 62° C. The Predicted Temperature 450illustrated in FIG. 4 and generated from a two prior iterations may bestored in the Temperature History Registers 402 as the next most recentPreviously Predicted Temperature T−1 and the most recent PreviouslyPredicted Temperature T for use in the method of FIG. 10.

In an embodiment, the first Rising Thermal Delta Predictor 421 predictstemperatures lower than the second Rising Thermal Delta Predictor 422,for the same inputs. This relationship may extend to more than twoRising Thermal Delta Predictors if needed. In an exemplary embodiment,the first Rising Thermal Predictor 421 predicts ⅔ of the positivethermal delta (from 0 to ⅔ of peak), and the second Rising Thermal DeltaPredictor 422 predicts the remaining ⅓ (from ⅔ of peak to the peak).

In an embodiment, the first Falling Thermal Delta Predictor 423 predictstemperatures higher than the second Falling Thermal Predictor 424, forthe same inputs. This relationship may extend to more than two FallingThermal Delta Predictors if needed. In an embodiment, the first FallingThermal Delta Predictor predicts ⅔ of the negative thermal delta (from 0to ⅔ of bottom), and the second Thermal Delta Predictor 424 predicts theremaining ⅓ (from ⅔ of bottom to the bottom).

In an embodiment, the library 270 includes an entry for each of aplurality of tasks, and each entry additionally includes a predictedutilization from the hardware counters 210 based on the last valuespredicted or profiled, to fill up a k-entry HC History in FIG. 5 withthe same values. Each entry may additionally include a predictedtemperature, which may be stored in one or more predicted temperatureregisters among register 230. The processing unit 16 or themicro-controller 250 may include logic (e.g., a task selector) to fillthe predicted temperature registers with the transient thermalprediction for each task. The predictions may be made with the same flowas FIG. 4, but with hardware counters from the library 270. The taskselector may select a task that has a lower temperature than a currentlyexecuted task. Other scheduling criteria such as task priority andfairness may be considered as well.

While the above disclosure refers to an embodiment of the invention thatuses 2 rising thermal delta predictors and 2 falling delta predictors,the invention is not limited thereto. For example, there may be one ormore additional rising thermal delta predictors and/or one or moreadditional falling thermal delta predictors. For example, if linearregression performed on the temperature data and hardware counter datashown in FIG. 3 has revealed the presence of a fifth intermediate linebetween lines 301 and 302 of a fifth intermediate slope, and a sixthintermediate line between lines 303 and 304 of a sixth intermediatesecond slope, a third rising thermal detector could be generated fromthe fifth intermediate line, and a third falling thermal detector couldbe generated from the sixth intermediate line. Then step S701 of FIG. 7would compute the minimum value from among the three rising thermaldetectors and step S704 of FIG. 7 would compute the maximum value fromamong the three falling thermal detectors. The method of FIG. 8 could bemodified in a similar manner to use the three rising thermal detectorsand the three falling detectors.

In an exemplary embodiment, each of the thermal predictors 420 is basedon a different linear function to generate corresponding linearpredictors. However, in an alternate embodiment, one or more of thethermal predictors 420 is instead based on an exponential function or aquadratic function. For example, if an analysis of the temperature andhardware counter data reveal that a given quadratic function bettermodels two portions of the data, while linear functions best models twoother portions of the data, then two of the thermal predictors would bebased on quadratic functions and the other two thermal predictors wouldbe based on linear functions. In another embodiment, one or more of thethermal predictors 420 are neural network predictors.

As will be appreciated by one skilled in the art, aspects of theinvention may be embodied as a system, method or computer programproduct. Accordingly, aspects of the invention may take the form of anentirely hardware embodiment, an entirely software embodiment (includingfirmware, resident software, micro-code, etc.) or an embodimentcombining software and hardware aspects that may all generally bereferred to herein as a “circuit,” “module” or “system.” Furthermore,aspects of the invention may take the form of a computer program productembodied in one or more computer readable medium(s) having computerreadable program code embodied thereon.

The computer program product may include a computer readable storagemedium (or media) having computer readable program instructions thereonfor causing a processor to carry out aspects of the present invention.

The computer readable storage medium can be a tangible device that canretain and store instructions for use by an instruction executiondevice. The computer readable storage medium may be, for example, but isnot limited to, an electronic storage device, a magnetic storage device,an optical storage device, an electromagnetic storage device, asemiconductor storage device, or any suitable combination of theforegoing. A non-exhaustive list of more specific examples of thecomputer readable storage medium includes the following: a portablecomputer diskette, a hard disk, a random access memory (RAM), aread-only memory (ROM), an erasable programmable read-only memory (EPROMor Flash memory), a static random access memory (SRAM), a portablecompact disc read-only memory (CD-ROM), a digital versatile disk (DVD),a memory stick, a floppy disk, a mechanically encoded device such aspunch-cards or raised structures in a groove having instructionsrecorded thereon, and any suitable combination of the foregoing. Acomputer readable storage medium, as used herein, is not to be construedas being transitory signals per se, such as radio waves or other freelypropagating electromagnetic waves, electromagnetic waves propagatingthrough a waveguide or other transmission media (e.g., light pulsespassing through a fiber-optic cable), or electrical signals transmittedthrough a wire.

Computer readable program instructions described herein can bedownloaded to respective computing/processing devices from a computerreadable storage medium or to an external computer or external storagedevice via a network, for example, the Internet, a local area network, awide area network and/or a wireless network. The network may comprisecopper transmission cables, optical transmission fibers, wirelesstransmission, routers, firewalls, switches, gateway computers and/oredge servers. A network adapter card or network interface in eachcomputing/processing device receives computer readable programinstructions from the network and forwards the computer readable programinstructions for storage in a computer readable storage medium withinthe respective computing/processing device.

Computer readable program instructions for carrying out operations ofthe present invention may be assembler instructions,instruction-set-architecture (ISA) instructions, machine instructions,machine dependent instructions, microcode, firmware instructions,state-setting data, or either source code or object code written in anycombination of one or more programming languages, including an objectoriented programming language such as Smalltalk, C++ or the like, andconventional procedural programming languages, such as the “C”programming language or similar programming languages. The computerreadable program instructions may execute entirely on the user'scomputer, partly on the user's computer, as a stand-alone softwarepackage, partly on the user's computer and partly on a remote computeror entirely on the remote computer or server. In the latter scenario,the remote computer may be connected to the user's computer through anytype of network, including a local area network (LAN) or a wide areanetwork (WAN), or the connection may be made to an external computer(for example, through the Internet using an Internet Service Provider).In some embodiments, electronic circuitry including, for example,programmable logic circuitry, field-programmable gate arrays (FPGA), orprogrammable logic arrays (PLA) may execute the computer readableprogram instructions by utilizing state information of the computerreadable program instructions to personalize the electronic circuitry,in order to perform aspects of the present invention.

Aspects of the present invention are described herein with reference toflowchart illustrations and/or block diagrams of methods, apparatus(systems), and computer program products according to embodiments of theinvention. It will be understood that each block of the flowchartillustrations and/or block diagrams, and combinations of blocks in theflowchart illustrations and/or block diagrams, can be implemented bycomputer readable program instructions.

These computer readable program instructions may be provided to aprocessor of a general purpose computer, special purpose computer, orother programmable data processing apparatus to produce a machine, suchthat the instructions, which execute via the processor of the computeror other programmable data processing apparatus, create means forimplementing the functions/acts specified in the flowchart and/or blockdiagram block or blocks. These computer readable program instructionsmay also be stored in a computer readable storage medium that can directa computer, a programmable data processing apparatus, and/or otherdevices to function in a particular manner, such that the computerreadable storage medium having instructions stored therein comprises anarticle of manufacture including instructions which implement aspects ofthe function/act specified in the flowchart and/or block diagram blockor blocks.

The computer readable program instructions may also be loaded onto acomputer, other programmable data processing apparatus, or other deviceto cause a series of operational steps to be performed on the computer,other programmable apparatus or other device to produce a computerimplemented process, such that the instructions which execute on thecomputer, other programmable apparatus, or other device implement thefunctions/acts specified in the flowchart and/or block diagram block orblocks.

The flowchart and block diagrams in the Figures illustrate thearchitecture, functionality, and operation of possible implementationsof systems, methods, and computer program products according to variousembodiments of the present invention. In this regard, each block in theflowchart or block diagrams may represent a module, segment, or portionof instructions, which comprises one or more executable instructions forimplementing the specified logical function(s). In some alternativeimplementations, the functions noted in the block may occur out of theorder noted in the figures. For example, two blocks shown in successionmay, in fact, be executed substantially concurrently, or the blocks maysometimes be executed in the reverse order, depending upon thefunctionality involved. It will also be noted that each block of theblock diagrams and/or flowchart illustration, and combinations of blocksin the block diagrams and/or flowchart illustration, can be implementedby special purpose hardware-based systems that perform the specifiedfunctions or acts or carry out combinations of special purpose hardwareand computer instructions.

What is claimed is:
 1. A method of predicting a future temperaturewithin an integrated circuit (IC) to prevent a malfunction of the IC,comprising: generating, first and second rising thermal deltapredictors, based on values of hardware counters of the IC andtemperatures sensed by a thermal sensor within the IC, to predict risingtemperature deltas; predicting the future temperature based on an idletemperature of the IC and a selected one of the temperature deltas; andperforming an action to prevent an internal temperature of the IC fromreaching the predicted future temperature, when the predicted futuretemperature exceeds a threshold temperature, wherein the predictedfuture temperature is a temperature at which the IC experiences themalfunction when the predicted future temperature exceeds the thresholdtemperature.
 2. The method of claim 1, further comprising generating,first and second falling thermal delta predictors, based on values ofhardware counters of the IC and temperatures sensed by the thermalsensor within the IC, to predict falling temperature deltas.
 3. Themethod of claim 2, wherein each thermal delta predictor is based on oneof i) a linear function, ii) an exponential function, and iii) aquadratic function.
 4. The method of claim 3, wherein the linearfunction is derived from performing a linear regression on pointsrepresenting the internal temperature sensed by the thermal sensor and acount performed by at least one of the hardware counters when thetemperature was sensed.
 5. The method of claim 1, the future temperatureis a sum of the idle temperature and the selected one temperature delta.6. The method of claim 3, wherein the first rising thermal predictor isbased on a first linear function having a first slope, the second risingthermal predictor is based on a second linear function having secondslope, the first falling thermal predictor is based on a third linearfunction having a third slope, and the second falling thermal predictoris based on a fourth linear function having a fourth slope, wherein thefirst slope is steeper than the second slope, and wherein the thirdslope is steeper than the fourth slope.
 7. The method of claim 1,wherein each thermal delta predictor comprises a first weight multipliedby a first count of a first one of the hardware counters added to asecond weight multiplied by a second counter of a second other one ofthe hardware counters.
 8. The method of claim 7, wherein the temperaturedelta of a corresponding one of the thermal delta predictors isgenerated by recording values of the two counters during a given period,generating a first sum from the recorded values of the first counter, asecond sum from the record values of the second counter, setting thefirst count to the first sum, and setting the second count to the secondsum to the second sum.
 9. The method of claim 2, wherein the onetemperature delta is selected by: operating the rising thermal deltapredictors to generate first values; and selecting a minimum of thefirst values as the selected one temperature delta when the minimum isgreater than or equal to a temperature difference sensed by the thermalsensor.
 10. The method of claim 9, further comprising: operating thefalling thermal delta predictors to generate second values when theminimum is less than the temperature difference; and selecting a maximumof the second values as the selected one temperature delta.
 11. Themethod of claim 2, the one temperature delta is selected by: determiningwhether the internal temperature sensed by the thermal sensor is greaterthan a previous temperature sensed by the thermal sensor or a previouslypredicted future temperature; operating one of the rising thermal deltapredictors to generate a value when the internal temperature isdetermined to be greater than the previous temperature or the previouslypredicted future temperature; and operating one of the falling thermaldelta predictors to generate the one temperature delta when the internaltemperature is determined to be less than the previous temperature orthe previously predicted future temperature.
 12. The method of claim 11,wherein operating one of the falling thermal delta predictors comprises:determining which of a first temperature range and second temperaturerange, the internal temperature sensed by the thermal sensor fitswithin; operating the first falling thermal delta predictor to generatethe one temperature delta when the internal temperature fits within thefirst temperature range; and operating the second falling thermal deltapredictor to generate the one temperature delta when the internaltemperature fits within the second temperature range.
 13. The method ofclaim 1, wherein the action is one of i) throttling a central processingunit (CPU) of the IC, ii) directing the CPU to switch from executing afirst task to executing a second task, and iii) increasing a priority ofthe first task and decreasing a priority of the second task
 14. Themethod of claim 13, wherein the throttling includes reducing anoperating frequency of the CPU.
 15. An integrated circuit (IC)comprising: a plurality of hardware performance counters; a thermalsensor; and a micro-controller, wherein the micro-controller generates aplurality of thermal predictors based on values of the counters andtemperatures sensed by the thermal sensor, the thermal predictorscomprising first and second rising thermal delta predictors to predictrising temperature deltas, wherein the micro-controller predicts afuture temperature of the IC based on an idle temperature of the IC anda selected one of the temperature deltas, and performs an action toprevent an internal temperature of the IC from reaching the predictedfuture temperature, when the predicted future temperature exceeds athreshold temperature, wherein the predicted future temperature is atemperature at which the IC experiences a malfunction when the predictedfuture temperature exceeds the threshold temperature.
 16. The IC ofclaim 15, the thermal predictors further comprising first and secondfalling thermal delta predictors to predict falling temperature deltas.17. The IC of claim 16, wherein each thermal delta predictor is based onone of i) a linear function, ii) an exponential function, and iii) aquadratic function.
 18. The IC of claim 17, wherein the first risingthermal predictor is based on a first linear function having a firstslope, the second rising thermal predictor is based on a second linearfunction having second slope, the first falling thermal predictor isbased on a third linear function having a third slope, and the secondfalling thermal predictor is based on a fourth linear function having afourth slope, wherein the first slope is steeper than the second slope,and wherein the third slope is steeper than the fourth slope.
 19. Acomputer program product for predicting a future temperature within anintegrated circuit (IC) to prevent a malfunction of the IC, the computerprogram product comprising a computer readable storage medium havingprogram instructions embodied therewith, the program instructionsexecutable by a computer to perform a method comprising: generating,first and second rising thermal delta predictors to predict risingtemperature deltas; predicting the future temperature based on an idletemperature of the IC and a selected one of the temperature deltas; andperforming one of i) reducing an operating frequency of a centralprocessing unit (CPU) of the IC, ii) directing the CPU to switch fromexecuting a first task to executing a second task, and iii) increasing apriority of the first task and decreasing a priority of the second task,when the predicted future temperature exceeds a threshold temperature,wherein the predicted future temperature is a temperature at which theIC experiences the malfunction when the predicted future temperatureexceeds the threshold temperature.
 20. The computer program product ofclaim 19, wherein the first and second rising thermal delta predictorsare based on values of hardware counters of the IC and temperaturessensed by a thermal sensor within the IC.